<?php

function wp_richedit_pre($text) {
    // Filtering a blank results in an annoying <br />\n
    if ( empty($text) ) return apply_filters('richedit_pre', '');

    $output = $text;
    $output = convert_chars($output);
    $output = wpautop($output);

    // These must be double-escaped or planets will collide.
    $output = str_replace('&lt;', '&amp;lt;', $output);
    $output = str_replace('&gt;', '&amp;gt;', $output);

    return apply_filters('richedit_pre', $output);
}


?>
